<%@page import="java.util.ArrayList"%>
<%@page import="java.util.List"%>
<%@ taglib prefix="ex" uri="WEB-INF/custom.tld"%>
<%@ page
	import="cn.jhg.account.service.*,
	org.springframework.context.ApplicationContext,
	org.springframework.web.context.support.WebApplicationContextUtils"
	import="cn.jhg.account.entity.User"
	%>

<%
	User user = new User();
	user.setAccount("Xuwei");
	user.setStatus(1);
	user.setEmail("test@test.test");
	pageContext.setAttribute("userinfo", user);
%>

<html>
<html>
<body>
	<h2>Hello World2!</h2>
	<ex:Hello />
	
	<h3>-------------------------------</h3>
	<ex:showUserInfo/>
	
	
	
	<h3>-------------------------------</h3>
	
<!-- 创建需要展现javabean（UserInfo）集合的实例（用于测试数据） -->

<%

    List<User> users = new ArrayList<User>();   

    users.add(new User("Zhangsan", 12, "Zhangsan@163.com"));

    users.add(new User("Lisi", 22, "Lisi@sina.com"));

    users.add(new User("Wangwu", 33, "Wangwu@qq.com"));

    pageContext.setAttribute("users", users);

%>


<!-- 给标签绑定数据源  -->

<table width='500px' border='1' align='center'>

    <tr>

        <td width='20%'>UserName</td>

        <td width='20%'>Age</td>

        <td>Email</td>

    </tr>

    <ex:repeater var="item" items="${pageScope.users }">

        <tr>

            <td>${item.getAccount() }</td>

            <td>${item.getStatus() }</td>

            <td>${item.getEmail() }</td>

        </tr>

    </ex:repeater>

</table>
	
</body>
</html>
